package org.frvi.goldspring.business.service;

import org.frvi.goldspring.business.dao.UserDao;
import org.frvi.goldspring.business.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by IntelliJ IDEA.
 * User: Frank
 * Date: Oct 15, 2009
 * Time: 11:08:08 PM
 * To change this template use File | Settings | File Templates.
 */
@Service("userService")
@Transactional
public class UserServiceImpl implements UserService {

    UserDao userDao;


    public UserDao getUserDao() {
        return userDao;
    }

    @Autowired
    @Required
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public User findByUserName(String username) {
        return (User) userDao.findByUserName(username);
    }
}
